package com.dotflat.check.service;


import com.dotflat.check.domain.CheckCard;
import com.dotflat.check.domain.Checker;
import com.dotflat.check.po.*;
import com.dotflat.rest.PO.AreableObjectBasePO;
import com.dotflat.rest.service.AreableObjectBaseService;
import com.matt.commons.page.PagerQuery;
import com.matt.domain.record.CheckRecord;
import org.springframework.data.domain.Page;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;


public interface CheckerService extends AreableObjectBaseService<Checker> {

    Checker getId(String id);
    Checker getByDevSno(String id);

    Checker addChecker(String areaId, String serialNO, String address);

    Map login( Integer checkerId, Integer loginPass );

    CheckCard addCard(String areaId,String cardNo ,String userId ,Integer type,String relationUserId);

    List<CheckUserPO> getUser(String areaId,Integer  type, Integer whole);

    List<CardPO> getCard(String areaId ,Integer  type, Integer whole);

    void delete(String cardNo);

    CheckRecord addRecord(String cardNo, int status, String time,  String checkId, MultipartFile file);

    Page<UserCardPO> getAllList(String areaId, Integer status, String classId,  PagerQuery page);

    Page<CheckCard> findAllByAreaId(String areaId,  PagerQuery page);

    List<CheckCard> findAllByUserIdsAndType(List<String> userIds,int type);

    Page<UserRelationCardInfoPO> getUserCardList(String areaId, Integer status, String classId, PagerQuery pagerQuery);

    CardInfoPO getCardStatus(String areaId,String cardNo,String ticket);

    List<CheckCard> findByTypeAndAreaId(int type,String areaId);

    Checker getByDevSno1(String devSno, String areaId);
}
